package cn.tedu.boot06.controller;

import cn.tedu.boot06.entity.Product;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AxiosController {

    @RequestMapping("/helloAxios")
    public String helloAxios() {
        return "王东旭和胡秀明互骂对方是呆逼！";
    }

    @RequestMapping("/p1")
    public String p1(String name, int age) {
        return name + ":" + age;
    }

    @RequestMapping("/p2")
    public String p2(@RequestBody Product product) {

        return product.toString();
    }
}
